From c7ee4f41c5fe8b5664c82e65bc4aa7948dc7b510 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 23 Aug 2022 02:26:09 -0700 Subject: generate new invoice on tip --- src/routes/invoice/[id]/+page.server.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/routes/invoice/[id]/+page.server.js') diff --git a/src/routes/invoice/[id]/+page.server.js b/src/routes/invoice/[id]/+page.server.js index 78607545..d46d039b 100644 --- a/src/routes/invoice/[id]/+page.server.js +++ b/src/routes/invoice/[id]/+page.server.js @@ -1,14 +1,8 @@ -import { get } from '$lib/utils'; +import cookie from 'cookie'; +import { get, post } from '$lib/utils'; export async function load({ params }) { let { id } = params; - let { - amount, - rate, - status, - text, - user: { username } - } = await get(`/invoice?uuid=${id}`); - - return { amount, id, rate, username, status, text }; + return { id, invoice: await get(`/invoice?uuid=${id}`) }; } + -- cgit v1.2.3